<?php
namespace App\Http\Resources\Trade\Supply;

use App\Http\Resources\ResourceCollection;

class ListResource extends ResourceCollection
{

    /**
     * Transform the resource into an array.
     *
     * @param \Illuminate\Http\Request $request            
     * @return array
     */
    public function toArray($request)
    {
        return $this->collection->map(function ($item, $key) {
            return DetailResource::makeDataDecode($item);
        })->toArray();
    }
}
